import com.project.bean.ClassBean;
import com.project.bean.RoomBean;
import com.project.bean.StudentBean;
import com.project.bean.UserBean;
import com.project.service.*;
import com.project.service.Imp.*;

import java.time.LocalDate;

public class test {
    public static void main(String[] args) {
        /*学生
        * */
        IStudentService iStudentService = new StudentService();
//        iStudentService.checkIn(new StudentBean("罗豪","男","123456",LocalDate.now(),""));//        学生入住
//        iStudentService.checkOut(33);//        学生退房
//        System.out.println(iStudentService.findById(1));//根据id查信息
//        System.out.println(iStudentService.findStudents("张三", "1", "新南路", 3));
//        iStudentService.changeRoom(3,4);//学生换房
        /*班级
        * */
        IClassService classService= new ClassService();
//        System.out.println(classService.findAllClass());//查询
//        classService.addClass(new ClassBean("7班",LocalDate.parse("2001-01-01"),"罗豪"));//添加班级
//        classService.deleteClass(8);//删除班级
        /*用户
        * */
        IUserService userService = new UserService();
//        System.out.println(userService.findAllUsers());//查询所有用户
//        userService.deleteUser(2);//删除用户
//        userService.addUser(new UserBean("user10",123,"罗豪","班主任"));
//        System.out.println(userService.findUserById(1));//根据id查询
//        userService.updateUserGrade(1,"等级3");//修改等级

        /*记录
        *
        * */
        IRecordService recordService = new RecordService();
//        System.out.println(recordService.findByRoomId(3));
//        recordService.addRecord("下水道坏了",2);
//        recordService.updateRecord(5,10);

        /*房间
        *
        * */

        IRoomService roomService= new RoomService();
//        roomService.addRoom(new RoomBean("四川省成都市",12,"男生寝室","正常"));
//        roomService.deleteRoom(8);
//        System.out.println(roomService.findSexRoom("男"));
//        System.out.println(roomService.findRoomById(2));
        System.out.println(roomService.findRooms("新南路2号", "正常", "可住房间", "女生寝室", 1));
    }
}
